﻿using demo1.Module.Dto;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;

namespace demo1.Controllers
{
    [ApiController]
    [Route("[controller]/[Action]")]
    public class BookControll:ControllerBase
    {
        SqlSugarClient _db;
        public BookControll(SqlSugarClient db)
        {
            _db = db;
        }
        [HttpGet]
        public async Task<List<Books>> GetBooks([FromQuery] string? id)
        {
            var books=await _db.Queryable<Books>().ToListAsync();
            return books;
        }
    }
}
